package b1.mobile.blackberry.io.http;

public class ServerInfo {
	public static String relativePath = "/B1iXcellerator/exec/soap/vP.001sap0003.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc";
	
	public String address = "";
	public String protocol = "http";
	
	public ServerInfo(String address, boolean isSSL){
		this.address = address;
		this.protocol = isSSL ? "https" : "http";
	}
	
	public String getUrl(){
		StringBuffer buffer = new StringBuffer();
		buffer.append(protocol);
		buffer.append("://");
		buffer.append(address);
		buffer.append(relativePath);
		
		return buffer.toString();
	}
	
	public String getServerUrl(){
		StringBuffer buffer = new StringBuffer();
		buffer.append(protocol);
		buffer.append("://");
		buffer.append(address);
		
		return buffer.toString();
	}
}
